package holdemdealer.deckgenerator;

import card.entity.Card;
import card.specs.CardName;
import card.specs.CardSuit;
import deck.Deck;

public class DeckGenerator {

    public Deck generateDeck() {
        Deck deck = new Deck();
        CardName[] cardNames = getCardNamesArray();
        CardSuit[] cardSuits = getCardSuitArray();

        for (CardSuit cardSuit : cardSuits) {
            for (CardName cardName : cardNames) {
                Card card = new Card(cardName, cardSuit);
                deck.addCard(card);
            }
        }

        return deck;

    }

    private CardName[] getCardNamesArray() {
        CardName[] values = CardName.values();
        return values;
    }

    private CardSuit[] getCardSuitArray() {
        CardSuit[] values = CardSuit.values();
        return values;
    }
}
